<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>drag and drop</title>
    <script src="http://www.jianvary.com/jquery.js"></script>
    <style>
        .drop{
            width: 150px;
            height: 200px;
            border: 1px solid #f0f0f0;
            color: #f0f0f0;
            float: left;
            margin-right: 50px;
        }
        .drop .marker{
            width: 50px;
            height: 50px;
            background: #666;
            font-size: 12px;
            text-align: center;
            border-radius: 3px;
            line-height: 50px;
            float: left;
            margin: 5px;
        }
        .drop .apicms{
            width: 50px;
            height: 50px;
            background: red;
            font-size: 12px;
            text-align: center;
            border-radius: 3px;
            line-height: 50px;
            float: left;
            margin: 5px;
        }
        .drop .marker2{
            background: blue;
        }
        .drop .marker3{
            background: orange
        }
    </style>
</head>
<body>
    <div class="drop" id="drop"  ondrop="(function(ev){var data = ev.dataTransfer.getData('Text');
        ev.target.appendChild(document.getElementById(data));})(event)"  ondragover="(function(ev){ev.preventDefault();})(event)">
        <div id="ee" draggable="true" isclick='false' ondragstart="(function(ev){ev.dataTransfer.setData('Text',ev.target.id);})(event)">
            <!-- <div class="marker">应用市场</div> -->
            <img src="images/lefticon/phone.png" draggable="false">
        </div>
        <div id="ee1" draggable="true" ondragstart="drag(event)">
            <div class="marker marker2">日程</div>
        </div>
        <div id="ee2"  ondragstart="drag(event)" draggable="true">
            <div class="marker marker3">车流</div>
        </div>
    </div>

    <div class="drop" id="drop2" ondrop="drop(event)"  ondragover="allDrop(event)">
        <span id="drag1"  draggable="false" ondragstart="drag(event)" class="apicms" ondragenter="dropResever" >
            接口管理
        </span>
    </div>

    <div id="drag2"  draggable="true" ondragstart="drag(event)" >
            <div class="apicms" ondragover="allDropResever()">接口管理</div>
        </div>
        
    <script>
        let drop1 = document.getElementById('drop'),
            drop2 = document.getElementById('drop2');

        function drop(ev){
            if(event.target.className == "drop"){
                var data = ev.dataTransfer.getData("Text");
                ev.target.appendChild(document.getElementById(data));
            }
        }
        function dropResever(ev){
            ev.preventDefault();
        }
        function drag(ev){
            ev.dataTransfer.setData("Text",ev.target.id);
        }
        function allDrop(ev){
            ev.preventDefault();
        }
        function allDropResever(){              //  不能放置拖放图标
            return false;
        }
    </script>
</body>
</html>